<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets">    
    <h:head>        
        <h:outputStylesheet library="css" name="default.css" />
        <h:outputScript library="js" name="jquery.ba-bbq.min.js" />
        <title>OnePageJSF</title>
    </h:head>    
    <h:body>
        <h:form id="formId">
            <p:layout fullPage="true">                
                <p:layoutUnit position="north" style="text-align: center;">
                    <p:growl id="messages" showDetail="true"/>
                    <p:ajaxStatus style="display:block;margin-bottom:2em;height:24px;">
                        <f:facet name="default">
                            <h:outputText value="Status: StandBy" />
                        </f:facet>
                        <f:facet name="start">
                            <p:graphicImage library="images" name="loading.gif" width="32" height="32" />
                        </f:facet>
                        <f:facet name="complete">
                            <h:outputText value="Status: loading completed" />
                        </f:facet>
                    </p:ajaxStatus>
                </p:layoutUnit>
                <p:layoutUnit position="west" resizable="true" size="170" minSize="160" maxSize="200">
                    <p:menu style="width:150px">
                        <p:submenu label="Navigation" icon="ui-icon-refresh">
                            <p:menuitem value="Create Menu" outcome="menu/index.xhtml" />                    
                        </p:submenu>    
                    </p:menu>
                    <p:remoteCommand name="updateNav" actionListener="#{mainBean.updateNav()}" update=":formId:centerpanel"/>
                </p:layoutUnit>
                <p:layoutUnit position="center" size="100%">
                    <h:panelGroup id="centerpanel" layout="block">
                        <ui:include id="include" src="#{mainBean.currentNav}" />
                    </h:panelGroup>
                </p:layoutUnit>
            </p:layout>
        </h:form>
    </h:body>
</html>

